home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
INARRAY.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
66 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_InArray( axArray, xData ) --> lIsInArray
PARAMETERS:
axArray : Array of CHAR, DATE, or NUM
cData : Data to locate
SHORT:
Determine if a value is in any element of specified array.
DESCRIPTION:
_InArray() searches the specified array for the data passed in xData.
If found, the function returns TRUE, else FALSE.
The array may be of mixed types, any array element incompatible with the
data being looked for is ignored.
In the case of character data, the return value is true if xData
appears ANYWHERE in the element.
In the case of Date or Numeric, the return value is true only if the
array element EXACTLY EQUALS xData.
NOTE:
_InArray() does not return the element number associated with the found
value, only whether it is in any of the arrays elements or not.
EXAMPLE:
LOCAL myarray := { 'One','Two','Three','Four','Five' }
t = _InArray(myarray,'Three')
Result: t = TRUE
t = _InArray(myarray,'ee')
Result: t = TRUE
t = _InArray(myarray,'Seven')
Result: t = FALSE
LOCAL myarray := { 'One', 1 , ctod('01/01/91') }
t = _InArray(myarray,'One')
Result: t = TRUE
t = _InArray(myarray,1)
Result: t = TRUE
t = _InArray(myarray,1.5)
Result: t = FALSE
t = _InArray(myarray,ctod('01/01/91') )
Result: t = TRUE
******************************************************************************/